#pragma once

#include <QWidget>
#include "ui_filletWidget.h"
#include "modelSoft.h"
#include <filletFeature.h>

QT_BEGIN_NAMESPACE
namespace Ui { class filletWidgetClass; };
QT_END_NAMESPACE

class filletWidget : public QWidget
{
	Q_OBJECT

public:
	filletWidget(modelSoft* myModelSoft, QWidget *parent = nullptr);
	~filletWidget();

protected:
	void createConnection();
	void onClickModify();
	void onClickConfirm();
	virtual void closeEvent(QCloseEvent* event) override;
	//void onClickCancel();
	void onClickEdgeSelect();
	void OnCancelSelEdge();

public:
	void receiveFilletSelectedShape(const TopoDS_Shape& subShape,Handle(QIVtkSelectionPipeline) pipeline);

private:
	Ui::filletWidgetClass *ui;
	modelSoft* myModelSoft;
	bool isModified;
	TopoDS_Shape selectSubEdge;
	Handle(QIVtkSelectionPipeline) selectPipeline;
	Handle(QIVtkSelectionPipeline) resultPipeline;
	FilletFeature* filletFeature;
	bool confirmCreated = false;
	bool targetReceive = false;
};
